/* section: library*/
g_bgimg_opacity = 0.0;

if( location.pathname=='/' || location.pathname=='/index.php' ){
	g_animate_step = 20;
}else{
	g_animate_step = 1;
}
$E = function(id){
	return document.getElementById(id);
};
set_opacity = function(e,opacity){
	if( document.all ){
		e.style.Filter = 'Alpha(Opacity='+opacity*100+')';
	}else{
		e.style.opacity = opacity;
	}
};
bgimg_loaded = function(){
	g_bgimg_opacity = 0.0;
	set_opacity($E('bgimg'),0.0);
	$E('bgimg').style.display='block';
	bgimg_show();
};
bgimg_show = function(){
	if( g_bgimg_opacity<1 ){
		g_bgimg_opacity += 0.1
		set_opacity(g_element_bg,g_bgimg_opacity);
		setTimeout(bgimg_show,g_animate_step);
	}
};
/* section: main */
g_element_bg = $E('bgimg');
file_img = 'style/bg1.jpg';
$E('bgimg').onload = bgimg_loaded;
$E('bgimg').src = file_img;
